<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品展示页面</title>
</head>
<body>

    <button><a href="/orders">排序</a></button>
    <table>
        <tr>
            <th>ID</th>
            <th>商品名称</th>
            <th>商品价格</th>
        </tr>

        {% for foo in goods_list %}
        <tr {% if loop.index %2 == 1 %} style="background: green" {% else %} style="background: red"{% endif %}>
            <td>{{ foo.id }}</td>
            <td>{{ foo.name }}</td>
            <td>{{ foo.price | yuan }}</td>
        </tr>
        {% endfor %}

    </table>
</body>
</html>